package src.lab02.text17;

import com.sun.org.apache.xpath.internal.SourceTree;

/**
 * Created by 12442 on 2017/10/26.
 */
public class Text {
    public static void main(String[] args) {
        int[] numbers=new int[10];



        numbers[0]=12;
        numbers[1]=3;
        numbers[2]=11;
        numbers[3]=15;
        numbers[4]=16;
        numbers[5]=19;
        numbers[6]=58;
        numbers[7]=45;
        numbers[8]=99;
        numbers[9]=25;

        //打印所有元素
        //System.out.println(number[0]);
        //System.out.println(number[1]);
        //System.out.println(number[2]);
        //System.out.println(number[3]);
        //System.out.println(number[4]);

        //下标：0-9
        int index;

        for (index=0;index < numbers.length;index++);

        System.out.println(numbers[index]);

        //最大值及位置



        //最小值及位置



        //总和

        int sum=0;

        int i;
        for (i=0;i<numbers.length;i++){
            sum+=numbers[i];
        }
        System.out.println("总和是："+sum);


    }
}
